package com.作业.Day2;

import java.util.Scanner;

public class Exercise {
    public static void main(String[] args) {
        for(int i=3;;){
            Scanner scanner = new Scanner(System.in);
            //输入账号
            System.out.println("输入账号");
            String account = scanner.next();
            //输入密码
            System.out.println("输入密码");
            String password = scanner.next();
            if(account.equals("admin")&&password.equals("123456")){
                System.out.println("输入正确我，请进行取款");
            }
            else {
                if(i==1){
                    System.out.println("您的次数已经用完");
                    break;
                }
                else
                    System.out.println("您还有"+--i+"次机会");

            }
        }
    }
}
